var replenishNum = $("#replenishNum").val();
var buyTotalNum = $("#buyTotalNum").val();
//检查补单数量
function checkNum(){
	var replenishNum = $("#replenishNum").val();
	var buyTotalNum = $("#buyTotalNum").val();
	if (CheckUtil.isNotNull(replenishNum) && parseInt(replenishNum) > parseInt(buyTotalNum)) {
		layer.msg("补单数不能大于订单总数!");
		return;
	}
}

function add() {
	var replenishNum = $("#replenishNum").val();
	var buyTotalNum = $("#buyTotalNum").val();
	if (!CheckUtil.isNotNull(replenishNum) || !CheckUtil.isInt(replenishNum, "+")) {
		layer.msg("请输入正确的补单数量!");
		return;
	}
	if (CheckUtil.isNotNull(replenishNum) && parseInt(replenishNum) > parseInt(buyTotalNum)) {
		layer.msg("补单数不能大于订单总数!");
		return;
	}
	if ($("#isReCommit").val() == 0) {
		$("#isReCommit").val(1);
		$("#saveAndUpdateFrom").submit();
	}
}